home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / winlib.lzh / WLCOOKIE / COOKIE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-04  |  1.8 KB  |  79 lines

  1. /*
  2.  *    WinLIB PRO Cookie Installer
  3.  *    by Ken Hollis
  4.  *
  5.  *    Uses Cookie Code installation at boot-time for all WinLIB PRO
  6.  *    executable programs.  Only useful when the setup program is
  7.  *    actually installed, but never-the-less, it will work so far.
  8.  */
  9.  
  10. #include <stdio.h>
  11. #include <stdlib.h>
  12. #include <screen.h>
  13. #include "winlib.h"
  14.  
  15. GLOBAL main()
  16. {
  17.     COOKIE *ourcookie, *temp;
  18.     PROGCOOKIE *opc;
  19.  
  20.     Cur_off();
  21.     Rev_on();
  22.  
  23.     printf("\n\n WinLIB PRO Cookie 0.14 by Ken Hollis \n");
  24.     printf("  COPYRIGHT \275 1994, Bitgate Software  \n");
  25.     printf(" Compiled on "__DATE__" at "__TIME__"  \n");
  26.  
  27.     temp = find_cookie('WPRO');
  28.  
  29.     if (temp != NULL) {
  30.         Rev_off();
  31.         printf("\nAborted: Cookie already installed!\n\n");
  32.         exit(1);
  33.     }
  34.  
  35.     opc->magic = 0xBEEF;
  36.  
  37. /*    opc->draw3d.magic = 0xBEEF;
  38.     opc->draw3d.mtlook = TRUE;
  39.     opc->draw3d.zoomlook = TRUE;
  40.     opc->draw3d.motiflook = TRUE;
  41.     opc->draw3d.genlook = TRUE;
  42.     opc->draw3d.winlook = FALSE;
  43.     opc->draw3d.def_low = L_MOTIF;
  44.     opc->draw3d.def_high = L_CUSTOM;
  45.  
  46.     opc->textmagic = 0x00000000;
  47.  
  48.     opc->custmenu.magic = 0xBEEF;
  49.     opc->custmenu.sideroot = TRUE;
  50.     opc->custmenu.scrolling = FALSE;
  51.     opc->custmenu.popup = TRUE;
  52.     opc->custmenu.dropdown = TRUE;
  53.     opc->custmenu.draw3d = TRUE;
  54.     opc->custmenu.style = 2;
  55.  
  56.     opc->deskrouts.magic = 0xBEEF;
  57.     opc->deskrouts.pictures = FALSE;
  58.     opc->deskrouts.iconmouse = TRUE;
  59.     opc->deskrouts.multidrag = FALSE;
  60.     opc->deskrouts.dragdrop = FALSE;
  61.     opc->deskrouts.icon_mf = TRUE;
  62.  
  63.     opc->xaes_vdimagic = 0xBEEF;
  64.  
  65.     opc->resource.magic = 0xBEEF;
  66.     opc->resource.largefile = FALSE;
  67.     opc->resource.autofix = TRUE;
  68.  
  69.     opc->clipbrd_magic = 0xBEEF; */
  70.  
  71.     create_cookie(ourcookie, 'WPRO', (long) opc);
  72.     new_cookie(ourcookie);
  73.  
  74.     Rev_off();
  75.  
  76.     printf("\nProgram cookie installed.\n\n");
  77.  
  78.     exit(0);
  79. }